// pages/contact/contact.js
const app = getApp();
Page({
  data: {
    bgTextStyle: 'dark',
    scrollTop: '200rpx',
    bgColor: '#ff0000',
    bgColorTop: '#00ff00',
    bgColorBottom: '#0000ff',
    nbTitle: '紧急维修',
    nbLoading: false,
    nbFrontColor: '#000000',
    nbBackgroundColor: '#ffffff',
    pageStyle: "color:#333333;background-color: #f1f1f1;",
    navs:[
      {title: "首页",class:"", path:"/pages/index/index", icon: "", font: "fa fa-home"},
      {title: "信息",class:"", path:"", icon: "", font: "fa fa-comments-o"},
      {title: "维修",class:"", path:"", icon: "", font: "fa fa-wrench"},
      {title: "我的",class:"co", path:"/pages/mine/mine", icon: "", font: "fa fa-user-circle"},
    ],
    binds: [],
    array: [],
    images: [{url:''},],
    index: 0,
    positions:[],
    position: 0,
    start: "2022-02-02",
    date: "2022-02-02",
    time: "09:00",
    order_id: 0,
    remark: "",
    type: 0,
    title: "",
    code: "",
    addreess: "",
    tel: "",
    bank: "",
    bank_code: "",
    name: "",
    phone: "",
    text: "",
    orderList:[],
    hasChange: false,
    enableRequest: true,
    ready: false
  },
  onLoad: function (options) {
  },
  onReady: function () {
  },
  onShow: function () {
    let v = this;
    v.getText();
  },
  getText(){
    let v = this;
    let url = app.globalData.host + '/api/common/text';
    wx.request({
      url: url, data: {id:1, token: app.globalData.token},
      success (res) {
        let r = res.data;
        if(r.code == 200 && r.data) {
          let dd = r.data;
          let txt = dd[1];
          console.log('getText',txt,dd);
          v.setData({text: txt});
        }
      }
    })
  },
  onSuccess: function (res) {
    console.log(res.detail);
  },
  onFail: function (res) {
    console.log(res);
  },
  onHide: function () {
  },
  onUnload: function () {
  },
  onPullDownRefresh: function () {
  },
  onReachBottom: function () {
  },
  onShareAppMessage: function () {
  }
})